import http from '@/utils/http'

export const getRankList = () => {
    return http({
        url: "/api/getrank/",
        methods: "get",
    }).then((res) => {
        console.log(res.data);
        return res.data.map(item => ({
            user_rank: item.user_rank,
            user_id: item.user_id,
            user_nick: item.user_nick,
            all_submit: item.all_submit,
            true_submit: item.true_submit,
            percentage: `${(item.true_submit / item.all_submit *100).toFixed(2)}%`
        }));
    })
}